﻿$("#exampleAccordion>li:nth-child(4) a").removeClass("collapsed");
$("#exampleAccordion>li:nth-child(4) ul").addClass("show");
$("#exampleAccordion>li:nth-child(4) ul>li:nth-child(1)").addClass("active");
$(function () {
    $('#dataTable').DataTable({
        "bFilter": false,
        "bSort": false,
        "oLanguage": { //国际化配置
            "sProcessing": "正在获取数据，请稍后...",
            "sLengthMenu": "显示 _MENU_ 条",
            "sZeroRecords": "没有您要的内容",
            "sInfo": "从 _START_ 到  _END_ 条 总共 _TOTAL_ 条",
            "sInfoEmpty": "记录数为0",
            "sInfoFiltered": "(全部记录数 _MAX_ 条)",
            "sInfoPostFix": "",
            "sSearch": "搜索",
            "sUrl": "",
            "oPaginate": {
                "sFirst": "第一页",
                "sPrevious": "上一页",
                "sNext": "下一页",
                "sLast": "最后一页"
            }
        },
        
    });
    $("[data-toggle='popover']").popover({ trigger:"hover"});
})

function isType(id, type,t) {
    var _this = $(t);
    $.post("/Notice/StopUser", { id: id, type: type }, function (data) {
        _this.text(data.Msg);
    })
}
	function del(id) {
		layer.alert('确定要删除吗', {
			skin: 'layui-layer-lan'
			, closeBtn: 0
			, anim: 4 //动画类型
		}, function () {
			var option = {
				type: 'post',
				url: '/Notice/Del',
				data: { id: id },
				callback: SetMode
			}
			swGather.swAjax(option)
		});
	}
	//ajax回调
	function SetMode(data) {
		layer.msg(data.Msg);
		setTimeout(function () {
			location.reload();
		}, 1500)
	}
